<template>
    <div class="container">
        <h4>Project List</h4><hr style="margin-top:-10px;">
        <el-table
        v-loading=false
        :data="list"
        element-loading-text="Loading"
        border
        fit
        highlight-current-row>
            <el-table-column align="center" label="序号">
                <template slot-scope="scope">{{ scope.row.MemberID }}</template>
            </el-table-column>
            <el-table-column align="center" label="姓名">
                <template slot-scope="scope">
                    {{ scope.row.MemberName }}
                </template>
            </el-table-column>
            <el-table-column align="center" label="角色">
                <template slot-scope="scope">{{ scope.row.MemberRole }}</template>
            </el-table-column>
            <el-table-column align="center" label="项目">
                <template slot-scope="scope">{{ scope.row.ProjectName }}</template>
            </el-table-column>
            <el-table-column align="center" label="创建时间">
                <template slot-scope="scope">{{ scope.row.Createtime }}</template>
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
import { listProject } from '@/api/project'
export default {
    data() {
        return {
            list: null
        };
    },
    created() {
        this.fetchData()
    },
    methods: {
        fetchData() {
            listProject().then(response => {
                this.list = response.data
                console.log(this.list)
            })
        },
    },
}
</script>
<style>
.container {
    margin-left: 20px;
}
</style>